home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume13 / ease.pch < prev    next >
Encoding:
Internet Message Format  |  1988-01-31  |  50.0 KB

  1. Subject:  v13i029:  Patches to EASE sendmail.cf language
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: "Arnold D. Robbins" <emory!arnold>
  7. Posting-number: Volume 13, Issue 29
  8. Archive-name: ease.pch
  9.  
  10. [  Ease is a language developed at Purdue that is a more friendly way of
  11.    writing sendmail.cf files.  A description was published in the Usenix
  12.    newsletter ;login: and the source was published in Volume 10 of this
  13.    newsgroup back in July1987 or so.  --r$ ]
  14.  
  15. Rich,
  16.     Enclosed please find a set of context diffs to 'ease'. These are
  17. relative to your most recent posting of ease, in July of this year.
  18.  
  19.     The README.new at the front describes the new features; there weren't
  20. a huge number of changes, but they make a difference in usability.
  21.  
  22. I hope the ease user community finds these helpful.
  23.  
  24. Arnold Robbins
  25. ARPA, CSNET:    arnold@emory.ARPA    BITNET: arnold@emory
  26. UUCP: { decvax, gatech, }!emory!arnold    DOMAIN: arnold@emory.edu (soon)
  27.  
  28. #! /bin/sh
  29. # This is a shell archive, meaning:
  30. # 1. Remove everything above the #! /bin/sh line.
  31. # 2. Save the resulting text in a file.
  32. # 3. Execute the file with /bin/sh (not csh) to create the files:
  33. #    README.new
  34. #    doc.diffs
  35. #    src.diffs
  36. #    local.shar
  37. export PATH; PATH=/bin:$PATH
  38. echo shar: extracting "'README.new'" '(1849 characters)'
  39. if test -f 'README.new'
  40. then
  41.     echo shar: will not over-write existing file "'README.new'"
  42. else
  43. cat << \Howard_The_Duck > 'README.new'
  44. README.new - Wed Dec 23 12:16:22 EST 1987
  45.  
  46. There are four files in this shar archive.
  47.  
  48. README.new    -- this file
  49. doc.diffs    -- diffs to the ease documentation
  50. local.shar    -- shell scripts and man page for running cpp and ease.
  51. src.diffs    -- diffs to the ease source
  52.  
  53. This posting provides a number of enhancements to the 'ease' language for
  54. writing sendmail configuration files. The diffs are relative to the
  55. last posting of ease to comp.sources.unix. They are set up in such a
  56. fashion that if used with the 'patch' utility, the several totally new files
  57. will be created automatically.
  58.  
  59. The enhancements provided and their authors are as follows:
  60.  
  61.     From Stephen Schaefer at BGSU:
  62.     + Ease will now echo its input to its output as sendmail
  63.       comments.  A simple sed script can recover either the
  64.       original ease or just the sendmail configuration.
  65.  
  66.     From Jeff Stearns at John Fluke Manufacturing Company:
  67.     + Additions to the syntax to support Sun sendmail extensions.
  68.     + Fixes to string handling routines to avoid null pointer
  69.       dereferencing problems.
  70.     + Improved flexibility in the handling of header definition lines.
  71.     + Pre-defining the class 'c_myname' for class 'w'.
  72.     + Miscellanious small bug fixes.
  73.  
  74.     From Arnold Robbins at Emory University:
  75.     + Support for new options and mailer flags in the 4.3 sendmail.
  76.     + Addition of the keyword "while", equivalent to "if".
  77.     + Modified the "canon" facility to accept more useful arguments.
  78.     + Grammar fixes to the Fluke changes to remove reduce/reduce conflicts.
  79.     + Miscellanious small bug fixes.
  80.  
  81. The new features and changes have all been documented in the ease manual.
  82.  
  83. In addition. local.shar contains 'sh' and 'ksh' scripts for collecting
  84. input and output files, and cpp options, and putting it all together to
  85. run ease, as well as a simple man page.
  86.  
  87. Arnold Robbins
  88. Emory University Computing Center
  89. Howard_The_Duck
  90. fi # end of overwriting check
  91. echo shar: extracting "'doc.diffs'" '(13697 characters)'
  92. if test -f 'doc.diffs'
  93. then
  94.     echo shar: will not over-write existing file "'doc.diffs'"
  95. else
  96. cat << \Howard_The_Duck > 'doc.diffs'
  97. diff -cr doc/Makefile /usr/src/local/local.bin/ease/doc/Makefile
  98. *** doc/Makefile    Thu Aug 13 12:07:05 1987
  99. --- /usr/src/local/local.bin/ease/doc/Makefile    Wed Dec 23 11:30:35 1987
  100. ***************
  101. *** 1,10 ****
  102.   #
  103.   #    Makefile for Ease document.
  104.   #
  105.   #    James S. Schoner
  106.   #    Purdue University Computing Center
  107.   #
  108. ! all:    cover mainbody apen1 apen2 apen3
  109.       
  110.   cover: FRC
  111.       troff -ms cover
  112. --- 1,21 ----
  113.   #
  114. + # $Header: Makefile,v 1.2 87/12/23 11:30:27 root Locked $
  115. + #
  116. + # $Log:    Makefile,v $
  117. + # Revision 1.2  87/12/23  11:30:27  root
  118. + # Added new appendix. ADR.
  119. + # 
  120. + # Revision 1.1  87/12/23  10:40:45  root
  121. + # Initial revision
  122. + # 
  123. + #
  124. + #
  125.   #    Makefile for Ease document.
  126.   #
  127.   #    James S. Schoner
  128.   #    Purdue University Computing Center
  129.   #
  130. ! all:    cover mainbody apen1 apen2 apen3 apen4
  131.       
  132.   cover: FRC
  133.       troff -ms cover
  134. ***************
  135. *** 20,25 ****
  136. --- 31,39 ----
  137.   
  138.   apen3:
  139.       tbl ap3 | troff -ms
  140. + apen4:
  141. +     tbl ap4 | troff -ms
  142.   
  143.   FRC:
  144.   
  145. diff -cr doc/ap1 /usr/src/local/local.bin/ease/doc/ap1
  146. *** doc/ap1    Thu Aug 13 12:07:06 1987
  147. --- /usr/src/local/local.bin/ease/doc/ap1    Thu Jan 21 15:33:47 1988
  148. ***************
  149. *** 37,42 ****
  150.   \fIm_rhdir\fR    z    The home directory of the recipient
  151.   .TE
  152.   .FS
  153. ! *  Taken from pages 15 and 16 of the Installation and Operation Guide
  154. ! for Sendmail (UNIX Programmer's Manual, Volume 2c), by Eric Allman.
  155.   .FE
  156. --- 37,42 ----
  157.   \fIm_rhdir\fR    z    The home directory of the recipient
  158.   .TE
  159.   .FS
  160. ! *  Taken from pages 19 and 20 of the Sendmail Installation and Operation Guide
  161. ! (SMM:7 in the 4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  162.   .FE
  163. diff -cr doc/ap2 /usr/src/local/local.bin/ease/doc/ap2
  164. *** doc/ap2    Thu Aug 13 12:07:08 1987
  165. --- /usr/src/local/local.bin/ease/doc/ap2    Thu Jan 21 17:10:56 1988
  166. ***************
  167. *** 1,3 ****
  168. --- 1,20 ----
  169. + ...
  170. + ... $Header: ap2,v 1.4 88/01/21 17:10:33 root Locked $
  171. + ... 
  172. + ... $Log:    ap2,v $
  173. + ... Revision 1.4  88/01/21  17:10:33  root
  174. + ... Added new option; change location of Sendmail doc to 4.3 SMM. ADR.
  175. + ... 
  176. + ... Revision 1.3  87/09/04  14:55:36  root
  177. + ... Fixed typo in new options. ADR.
  178. + ... 
  179. + ... Revision 1.2  87/03/03  17:05:41  root
  180. + ... Changes for 4.3 version of sendmail. ADR.
  181. + ... 
  182. + ... Revision 1.1  87/03/03  17:01:24  root
  183. + ... Initial revision
  184. + ... 
  185. + ...
  186.   .DS C
  187.   \s+5\fBAppendix B\fR
  188.   
  189. ***************
  190. *** 7,14 ****
  191.   .sp 2
  192.   .PP
  193.   For a complete description of Sendmail's options and their values, refer to 
  194. ! Appendix B of the Installation and Operation Guide for Sendmail (UNIX
  195. ! Programmer's Manual, Volume 2c), by Eric Allman.
  196.   .sp 2
  197.   .TS 
  198.   center box;
  199. --- 24,31 ----
  200.   .sp 2
  201.   .PP
  202.   For a complete description of Sendmail's options and their values, refer to 
  203. ! Appendix B of the Sendmail Installation and Operation Guide (SMM:7 in the
  204. ! 4.3 BSD UNIX System Managers's Manual), by Eric Allman.
  205.   .sp 2
  206.   .TS 
  207.   center box;
  208. ***************
  209. *** 41,46 ****
  210. --- 58,64 ----
  211.   \fIo_dnet\fR    N    
  212.   \fIo_hformat\fR    o    
  213.   \fIo_qdir\fR    Q    
  214. + \fIo_qfactor\fR    q
  215.   \fIo_tread\fR    r    
  216.   \fIo_flog\fR    S    
  217.   \fIo_safe\fR    s    
  218. ***************
  219. *** 51,54 ****
  220. --- 69,76 ----
  221.   \fIo_wizpass\fR    W    
  222.   \fIo_loadq\fR    x    
  223.   \fIo_loadnc\fR    X    
  224. + \fIo_recipfactor\fR    y
  225. + \fIo_newproc\fR    Y
  226. + \fIo_prifactor\fR    z
  227. + \fIo_waitfactor\fR    Z
  228.   .TE
  229. diff -cr doc/ap3 /usr/src/local/local.bin/ease/doc/ap3
  230. *** doc/ap3    Thu Aug 13 12:07:10 1987
  231. --- /usr/src/local/local.bin/ease/doc/ap3    Thu Jan 21 17:11:11 1988
  232. ***************
  233. *** 1,3 ****
  234. --- 1,17 ----
  235. + ...
  236. + ... $Header: ap3,v 1.3 88/01/21 17:10:57 root Locked $
  237. + ... 
  238. + ... $Log:    ap3,v $
  239. + ... Revision 1.3  88/01/21  17:10:57  root
  240. + ... Changed location of Sendmail doc to 4.3 SMM. ADR.
  241. + ... 
  242. + ... Revision 1.2  87/03/03  17:05:53  root
  243. + ... Changes for 4.3 version of sendmail. ADR.
  244. + ... 
  245. + ... Revision 1.1  87/03/03  17:04:52  root
  246. + ... Initial revision
  247. + ... 
  248. + ...
  249.   .DS C
  250.   \s+5\fBAppendix C\fR
  251.   
  252. ***************
  253. *** 7,14 ****
  254.   .sp 5
  255.   .PP
  256.   For a complete description of mailer flags, refer to 
  257. ! Appendix C of the Installation and Operation Guide for Sendmail (UNIX
  258. ! Programmer's Manual, Volume 2c), by Eric Allman.
  259.   .sp 5
  260.   .TS 
  261.   center box;
  262. --- 21,28 ----
  263.   .sp 5
  264.   .PP
  265.   For a complete description of mailer flags, refer to 
  266. ! Appendix C of the Sendmail Installation and Operation Guide (SMM:7 in the
  267. ! 4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  268.   .sp 5
  269.   .TS 
  270.   center box;
  271. ***************
  272. *** 38,41 ****
  273. --- 52,56 ----
  274.   \fIf_retsmtp\fR    p    
  275.   \fIf_smtp\fR    I    
  276.   \fIf_addrw\fR    C    
  277. + \fIf_escape\fR    E
  278.   .TE
  279. diff -cr doc/cover /usr/src/local/local.bin/ease/doc/cover
  280. *** doc/cover    Thu Aug 13 12:07:11 1987
  281. --- /usr/src/local/local.bin/ease/doc/cover    Wed Dec 23 11:30:46 1987
  282. ***************
  283. *** 1,3 ****
  284. --- 1,14 ----
  285. + ...
  286. + ... $Header: cover,v 1.2 87/12/23 11:30:36 root Locked $
  287. + ...
  288. + ... $Log:    cover,v $
  289. + ... Revision 1.2  87/12/23  11:30:36  root
  290. + ... Updated list of authors. ADR.
  291. + ... 
  292. + ... Revision 1.1  87/12/23  10:16:35  root
  293. + ... Initial revision
  294. + ... 
  295. + ...
  296.   .DA
  297.   .sp 15
  298.   .nr PS 14
  299. ***************
  300. *** 19,25 ****
  301.     
  302.   for Sendmail
  303.   .DE
  304. ! .sp 13
  305.   .nr PS 14
  306.   .ps 14
  307.   .DS C
  308. --- 30,36 ----
  309.     
  310.   for Sendmail
  311.   .DE
  312. ! .sp 8
  313.   .nr PS 14
  314.   .ps 14
  315.   .DS C
  316. ***************
  317. *** 27,30 ****
  318. --- 38,49 ----
  319.   
  320.   \fIJames S. Schoner\fR
  321.   \fIPurdue University Computing Center\fR
  322. + Amended by
  323. + \fIJeff P. Stearns\fR
  324. + \fIJohn Fluke Manufacturing Company\fR
  325. + \fIArnold D. Robbins\fR
  326. + \fIEmory University Computing Center\fR
  327.   .DE
  328. diff -cr doc/ease.paper /usr/src/local/local.bin/ease/doc/ease.paper
  329. *** doc/ease.paper    Thu Aug 13 12:08:37 1987
  330. --- /usr/src/local/local.bin/ease/doc/ease.paper    Thu Jan 21 17:19:52 1988
  331. ***************
  332. *** 1,3 ****
  333. --- 1,24 ----
  334. + ...
  335. + ... $Header: ease.paper,v 1.5 88/01/21 17:19:35 root Locked $
  336. + ... 
  337. + ... $Log:    ease.paper,v $
  338. + ... Revision 1.5  88/01/21  17:19:35  root
  339. + ... Several editorial changes. ADR.
  340. + ... 
  341. + ... Revision 1.4  87/12/23  11:30:47  root
  342. + ... Updated list of authors. Documented extended canon() capability.
  343. + ... Integrated fluke changes in a little better. ADR.
  344. + ... 
  345. + ... Revision 1.3  87/11/04  11:33:45  root
  346. + ... Documented new keyword "while" which is equivalent to "if". ADR.
  347. + ... 
  348. + ... Revision 1.2  87/08/13  17:08:05  root
  349. + ... Changes from Jeff Stearns, fluke!jeff, for Sun. ADR.
  350. + ... 
  351. + ... Revision 1.1  87/08/13  17:05:00  root
  352. + ... Initial revision
  353. + ... 
  354. + ...
  355.   .LP
  356.   .TL
  357.   Ease: A Configuration Language
  358. ***************
  359. *** 7,12 ****
  360. --- 28,43 ----
  361.   .AI
  362.   Purdue University Computing Center
  363.   West Lafayette, Indiana  47907
  364. + .AU
  365. + Jeff P. Stearns
  366. + .AI
  367. + John Fluke Manufacturing Company
  368. + Everett, Washington  98206
  369. + .AU
  370. + Arnold D. Robbins
  371. + .AI
  372. + Emory University Computing Center
  373. + Atlanta, Georgia  30322
  374.   .sp 2
  375.   .I
  376.   .ce
  377. ***************
  378. *** 47,53 ****
  379.   the most needed improvement.  Nevertheless, every element of a configuration 
  380.   file is structurally enhanced through the use of \fBEase\fR. 
  381.   .FS
  382. ! *  UNIX is a trademark of AT&T Bell Laboratories.
  383.   .FE
  384.   .sp 2
  385.   .NH
  386. --- 78,84 ----
  387.   the most needed improvement.  Nevertheless, every element of a configuration 
  388.   file is structurally enhanced through the use of \fBEase\fR. 
  389.   .FS
  390. ! *  UNIX is a registered trademark of AT&T.
  391.   .FE
  392.   .sp 2
  393.   .NH
  394. ***************
  395. *** 107,114 ****
  396.   the special uses of
  397.   pre-defined macros, and the method of building configuration files.  To
  398.   obtain this information, the reader is advised to refer to
  399. ! the Installation and Operation Guide for Sendmail (UNIX
  400. ! Programmer's Manual, Volume 2c), by Eric Allman.\fR
  401.   .FE
  402.   .PP
  403.   At its highest level, \fBEase\fR can be viewed as a collection of 
  404. --- 138,146 ----
  405.   the special uses of
  406.   pre-defined macros, and the method of building configuration files.  To
  407.   obtain this information, the reader is advised to refer to
  408. ! the Sendmail Installation and Operation Guide (SMM:7 in the 4.3 BSD
  409. ! UNIX System Manager's Manual),
  410. ! by Eric Allman.\fR
  411.   .FE
  412.   .PP
  413.   At its highest level, \fBEase\fR can be viewed as a collection of 
  414. ***************
  415. *** 218,224 ****
  416.   .PP
  417.   last_name = "Schoner";
  418.   .PP
  419. ! whole_name = "${first_name} ${second_name}";
  420.   .sp 1
  421.   defines the macros first_name, last_name, and whole_name, where whole_name
  422.   is the string, "James Schoner".
  423. --- 250,256 ----
  424.   .PP
  425.   last_name = "Schoner";
  426.   .PP
  427. ! whole_name = "${first_name} ${last_name}";
  428.   .sp 1
  429.   defines the macros first_name, last_name, and whole_name, where whole_name
  430.   is the string, "James Schoner".
  431. ***************
  432. *** 291,297 ****
  433.   .PP
  434.   \fIo_tmode\fR = "0600" ;
  435.   .PP
  436. ! \fIo_delivery\fR = d_background ;
  437.   .sp 1
  438.   sets the options \fIo_alias\fR, \fIo_tmode\fR, and \fIo_delivery\fR.
  439.   .NH 2
  440. --- 323,329 ----
  441.   .PP
  442.   \fIo_tmode\fR = "0600" ;
  443.   .PP
  444. ! \fIo_delivery\fR = \fId_background\fR ;
  445.   .sp 1
  446.   sets the options \fIo_alias\fR, \fIo_tmode\fR, and \fIo_delivery\fR.
  447.   .NH 2
  448. ***************
  449. *** 382,390 ****
  450.   define a header,
  451.   regardless of mailer flags.  Refer to Appendix C for a list of \fBEase\fR 
  452.   identifiers representing mailer flags.  The header title is a simple
  453. ! string of characters (no macro references), whereas the \fBheader-value\fR can
  454. ! be either a string of characters (possibly containing macro references) or 
  455. ! a \fBconditional-expression\fR (discussed later).
  456.   .sp 1
  457.   The following example,
  458.   .DS
  459. --- 414,423 ----
  460.   define a header,
  461.   regardless of mailer flags.  Refer to Appendix C for a list of \fBEase\fR 
  462.   identifiers representing mailer flags.  The header title is a simple
  463. ! string of characters (no macro references), whereas the \fBheader-value\fR
  464. ! is a series of one or more strings and
  465. ! \fBconditional-expressions\fP (discussed later).
  466. ! Concatenation is implicit (as in \fIawk\fP).
  467.   .sp 1
  468.   The following example,
  469.   .DS
  470. ***************
  471. *** 495,502 ****
  472.       \fImatch\fR ( 0* )
  473.       \fImatch\fR ( 1* )
  474.       \fImatch\fR ( 1 )
  475. !     \fImatch\fR ( 1 ) in <class-X>
  476. !     \fImatch\fR ( 0 ) in <class-X>
  477.   .DE
  478.   The star in the first two forms means: "or more".  Thus, the first
  479.   form would read: "match zero or more tokens".  The fourth form describes
  480. --- 528,535 ----
  481.       \fImatch\fR ( 0* )
  482.       \fImatch\fR ( 1* )
  483.       \fImatch\fR ( 1 )
  484. !     \fImatch\fR ( 1 ) \fIin\fR <class-X>
  485. !     \fImatch\fR ( 0 ) \fIin\fR <class-X>
  486.   .DE
  487.   The star in the first two forms means: "or more".  Thus, the first
  488.   form would read: "match zero or more tokens".  The fourth form describes
  489. ***************
  490. *** 504,509 ****
  491. --- 537,552 ----
  492.   the fifth form describes a field where one token is matched if it is not of the
  493.   given class (class-X).
  494.   .sp 1
  495. + In addition, the Sun release 3.0 version of sendmail supports several
  496. + new pattern matching operations represented by the following forms:
  497. + .DS
  498. +     \fImatch\fR ( 0 ) \fImap\fR <macro-identifier-X>
  499. +     \fImatch\fR ( 1 ) \fImap\fR <macro-identifier-X>
  500. +     \fImatch host\fR
  501. + .DE
  502. + The macro \*Qmacro-identifier-X\*U should be assigned the name of the
  503. + relevant YP map.
  504. + .sp 1
  505.   The following example,
  506.   .sp 1
  507.   .DS
  508. ***************
  509. *** 510,517 ****
  510.   \fIfield\fR
  511.       anypath        : \fImatch\fR ( 0* );
  512.       recipient_host    : \fImatch\fR ( 1 );
  513. !     local_site        : \fImatch\fR ( 1 ) in \fIm_sitename\fR;
  514. !     remote_site        : \fImatch\fR ( 0 ) in \fIm_sitename\fR;
  515.   .DE
  516.   defines the fields anypath, recipient_host, local_site, and remote_site.
  517.   .NH 2
  518. --- 553,560 ----
  519.   \fIfield\fR
  520.       anypath        : \fImatch\fR ( 0* );
  521.       recipient_host    : \fImatch\fR ( 1 );
  522. !     local_site        : \fImatch\fR ( 1 ) \fIin m_sitename\fR;
  523. !     remote_site        : \fImatch\fR ( 0 ) \fIin m_sitename\fR;
  524.   .DE
  525.   defines the fields anypath, recipient_host, local_site, and remote_site.
  526.   .NH 2
  527. ***************
  528. *** 536,541 ****
  529. --- 579,591 ----
  530.           <match-action> ( <rewriting-pattern> ) ;
  531.   .DE
  532.   where match-pattern, rewriting-pattern, and match-action are described below.
  533. + An alternative form is available:
  534. + .DS
  535. +     \fIwhile\fR ( <match-pattern> )
  536. +         <match-action> ( <rewriting-pattern> ) ;
  537. + .DE
  538. + which is somewhat more useful when the \*Qmatch-action\*U is \fIretry\fP
  539. + (see below).
  540.   .NH 3
  541.   Match-patterns
  542.   .PP
  543. ***************
  544. *** 601,609 ****
  545.   T}
  546.   
  547.   T{
  548. ! 7. Canonicalized host names of the form \fIcanon\fR (<id-token>),
  549. ! where id-token is a regular identifier, a quoted identifier (with
  550. ! double quotes), a macro reference yielding an identifier, or a 
  551.   positional reference in the matched address.  The canonicalization of 
  552.   a host name is simply a mapping to its canonical (or official) form.
  553.   T}
  554. --- 651,662 ----
  555.   T}
  556.   
  557.   T{
  558. ! 7. Canonicalized host names of the form \fIcanon\fR (<id-token-list>),
  559. ! where \*Qid-token-list\*U is a list of one or more \*Qid-tokens.\*U
  560. ! An \*Qid-token\*U is a regular identifier, a quoted identifier (with
  561. ! double quotes), a macro reference yielding an identifier,
  562. ! a numeric internet specification (see below),
  563. ! a literal character (such as a \*Q.\*U or a \*Q[\*U), or a 
  564.   positional reference in the matched address.  The canonicalization of 
  565.   a host name is simply a mapping to its canonical (or official) form.
  566.   T}
  567. ***************
  568. *** 682,688 ****
  569.       anypath    : \fImatch\fR (0*);
  570.       usr, path    : \fImatch\fR (1*);
  571.       hostname    : \fImatch\fR (1);
  572. !     phone_host    : \fImatch\fR (1) in phonehosts;
  573.   .DE
  574.   .DS
  575.   \fIruleset\fR
  576. --- 735,741 ----
  577.       anypath    : \fImatch\fR (0*);
  578.       usr, path    : \fImatch\fR (1*);
  579.       hostname    : \fImatch\fR (1);
  580. !     phone_host    : \fImatch\fR (1) \fIin\fR phonehosts;
  581.   .DE
  582.   .DS
  583.   \fIruleset\fR
  584. diff -c /dev/null ap4
  585. *** /dev/null    Mon Jan 25 15:47:24 1988
  586. --- ap4    Thu Jan 21 15:13:19 1988
  587. ***************
  588. *** 0 ****
  589. --- 1,15 ----
  590. + .DS C
  591. + \s+5\fBAppendix D\fR
  592. + \fBPre-Defined Classes\fR\s-5
  593. + .DE
  594. + .sp 5
  595. + .TS 
  596. + center box;
  597. + c|c|c
  598. + l|l|l.
  599. + \fBEase\fR Class    Raw Equivalent    Meaning
  600. + =
  601. + \fIc_myname\fR    w    The list of names by which this host is known
  602. + .TE
  603. Howard_The_Duck
  604. fi # end of overwriting check
  605. echo shar: extracting "'src.diffs'" '(29805 characters)'
  606. if test -f 'src.diffs'
  607. then
  608.     echo shar: will not over-write existing file "'src.diffs'"
  609. else
  610. cat << \Howard_The_Duck > 'src.diffs'
  611. diff -cr src/Makefile /usr/src/local/local.bin/ease/src/Makefile
  612. *** src/Makefile    Thu Aug 13 12:07:24 1987
  613. --- /usr/src/local/local.bin/ease/src/Makefile    Thu Jan 21 19:05:32 1988
  614. ***************
  615. *** 1,6 ****
  616.   # Makefile for Ease Translator (et).
  617.   #
  618. ! #    $Header: /usr/src/local/etc/ease/RCS/Makefile,v 1.4 85/10/29 22:57:06 jss Exp $
  619.   #
  620.   #    James S. Schoner, Purdue University Computing Center,
  621.   #              West Lafayette, Indiana  47907
  622. --- 1,6 ----
  623.   # Makefile for Ease Translator (et).
  624.   #
  625. ! #    $Header: Makefile,v 1.5 87/09/14 18:07:59 root Locked $
  626.   #
  627.   #    James S. Schoner, Purdue University Computing Center,
  628.   #              West Lafayette, Indiana  47907
  629. ***************
  630. *** 25,34 ****
  631.   LPFLAGS = -J"Ease Source"
  632.   
  633.   HDR = symtab.h
  634. ! SRC = main.c emitcf.c errors.c idman.c strops.c symtab.c
  635.   LST = Makefile lexan.l parser.y ${HDR} ${SRC}
  636.   DEP = y.tab.c lex.yy.c ${SRC}
  637. ! OBJ = y.tab.o lex.yy.o main.o emitcf.o errors.o idman.o strops.o symtab.o
  638.   
  639.   all: et
  640.   
  641. --- 25,35 ----
  642.   LPFLAGS = -J"Ease Source"
  643.   
  644.   HDR = symtab.h
  645. ! SRC = main.c emitcf.c errors.c idman.c strops.c symtab.c fixstrings.c
  646.   LST = Makefile lexan.l parser.y ${HDR} ${SRC}
  647.   DEP = y.tab.c lex.yy.c ${SRC}
  648. ! OBJ = y.tab.o lex.yy.o main.o emitcf.o errors.o idman.o strops.o symtab.o \
  649. !     fixstrings.o
  650.   
  651.   all: et
  652.   
  653. diff -cr src/emitcf.c /usr/src/local/local.bin/ease/src/emitcf.c
  654. *** src/emitcf.c    Thu Aug 13 12:08:15 1987
  655. --- /usr/src/local/local.bin/ease/src/emitcf.c    Thu Aug 13 16:24:32 1987
  656. ***************
  657. *** 1,4 ****
  658. ! /*    $Header: /usr/src/local/etc/ease/RCS/emitcf.c,v 1.3 85/11/22 20:14:11 jss Exp $    */
  659.   
  660.   /*
  661.    *    emitcf.c  -- This file contains routines associated with the writing
  662. --- 1,4 ----
  663. ! /*    $Header: emitcf.c,v 1.4 87/08/13 16:24:06 root Locked $    */
  664.   
  665.   /*
  666.    *    emitcf.c  -- This file contains routines associated with the writing
  667. ***************
  668. *** 17,22 ****
  669. --- 17,23 ----
  670.   
  671.   #include <stdio.h>
  672.   #include "symtab.h"
  673. + #include "fixstrings.h"
  674.   
  675.   #define REGLINE 60    /* length of output lines which may be continued */
  676.   #define MAXLINE 256    /* liberal maximum line length             */
  677. diff -cr src/errors.c /usr/src/local/local.bin/ease/src/errors.c
  678. *** src/errors.c    Thu Aug 13 12:07:50 1987
  679. --- /usr/src/local/local.bin/ease/src/errors.c    Thu Aug 13 16:24:35 1987
  680. ***************
  681. *** 1,4 ****
  682. ! /*    $Header: /usr/src/local/etc/ease/RCS/errors.c,v 1.2 85/10/29 23:40:20 jss Exp $    */
  683.   
  684.   /*
  685.    *      errors.c   -- Contains error initialization and reporting routines.
  686. --- 1,4 ----
  687. ! /*    $Header: errors.c,v 1.3 87/08/13 16:24:32 root Locked $    */
  688.   
  689.   /*
  690.    *      errors.c   -- Contains error initialization and reporting routines.
  691. ***************
  692. *** 15,20 ****
  693. --- 15,21 ----
  694.    */
  695.   
  696.   #include <stdio.h>
  697. + #include "fixstrings.h"
  698.   
  699.   extern int  ErrorCount;     /* error count                   */
  700.   extern char FNbuf[];     /* input file name              */
  701. diff -cr src/idman.c /usr/src/local/local.bin/ease/src/idman.c
  702. *** src/idman.c    Thu Aug 13 12:07:53 1987
  703. --- /usr/src/local/local.bin/ease/src/idman.c    Thu Aug 13 16:24:39 1987
  704. ***************
  705. *** 1,4 ****
  706. ! /*    $Header: /usr/src/local/etc/ease/RCS/idman.c,v 1.2 85/10/29 23:41:38 jss Exp $    */
  707.   
  708.   /*
  709.    *      idman.c    -- Contains routines for manipulating identifiers and their
  710. --- 1,4 ----
  711. ! /*    $Header: idman.c,v 1.3 87/08/13 16:24:36 root Locked $    */
  712.   
  713.   /*
  714.    *      idman.c    -- Contains routines for manipulating identifiers and their
  715. ***************
  716. *** 17,22 ****
  717. --- 17,23 ----
  718.   
  719.   #include <stdio.h>
  720.   #include "symtab.h"
  721. + #include "fixstrings.h"
  722.   
  723.   extern struct he *LookupSymbol ();
  724.   extern void      FatalError (),
  725. diff -cr src/lexan.l /usr/src/local/local.bin/ease/src/lexan.l
  726. *** src/lexan.l    Thu Aug 13 12:07:55 1987
  727. --- /usr/src/local/local.bin/ease/src/lexan.l    Mon Jan 25 15:41:26 1988
  728. ***************
  729. *** 1,5 ****
  730.   %{
  731. ! /*    $Header: /usr/src/local/etc/ease/RCS/lexan.l,v 1.2 85/10/29 23:42:40 jss Exp $    */
  732.   
  733.   /*
  734.    *    lexan.l -- Lexical Analyzer for EASE.
  735. --- 1,5 ----
  736.   %{
  737. ! /*    $Header: lexan.l,v 1.9 88/01/25 15:41:02 root Locked $    */
  738.   
  739.   /*
  740.    *    lexan.l -- Lexical Analyzer for EASE.
  741. ***************
  742. *** 19,24 ****
  743. --- 19,25 ----
  744.    *
  745.    */
  746.   
  747. + #include "fixstrings.h"
  748.   #include "symtab.h"
  749.   #include "lexdefs.h"
  750.   
  751. ***************
  752. *** 33,44 ****
  753.   char FNbuf[MaxFN];            /* file name buffer        */
  754.   short RMatch  = FALSE;            /* ruleset match flag          */
  755.   
  756.   %}
  757.   
  758.   /* lex-specific extensions */
  759. ! %e 1100
  760. ! %p 3700
  761. ! %n 500
  762.   
  763.   %%
  764.       int INch;            /* any input character */
  765. --- 34,73 ----
  766.   char FNbuf[MaxFN];            /* file name buffer        */
  767.   short RMatch  = FALSE;            /* ruleset match flag          */
  768.   
  769. + #undef input
  770. + # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):Getc(yyin,yyout))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
  771. + char
  772. + Getc (yyin, yyout)
  773. +     FILE *yyin, *yyout;
  774. + {
  775. +     static char linbuf[BUFSIZ], *pc = linbuf;
  776. +     char c;
  777. +     /* initialize buffer: first call only */
  778. +     if (*pc == '\0' && pc == linbuf) {
  779. +         if (fgets(linbuf, BUFSIZ, yyin)==NULL)
  780. +             return EOF;
  781. +         fprintf(yyout, "# %s", linbuf);  /* echo input as comment */
  782. +     }
  783. +     c = *pc++;
  784. +     if (c == '\n') {
  785. +         pc = linbuf;
  786. +         if (fgets(linbuf, BUFSIZ, yyin) == NULL)
  787. +             *pc = EOF;
  788. +         else
  789. +             /* echo input as comment */
  790. +             fprintf(yyout, "# %s", linbuf);
  791. +     }
  792. +     return c;
  793. + }
  794.   %}
  795.   
  796.   /* lex-specific extensions */
  797. ! %e 1300
  798. ! %p 4000
  799. ! %n 600
  800.   
  801.   %%
  802.       int INch;            /* any input character */
  803. ***************
  804. *** 45,56 ****
  805.   
  806.   [ \t\f]+            ;     /* discard whitepsace  */
  807.   [\n]                Lcount++;
  808. ! ^\#[ \t]*[0-9]+[ \t]*\".*\"[ \t]*$    {
  809.                       sscanf (yytext, "%*c%d%s", &Lcount, FNbuf);
  810. -                     INch = input ();
  811.                       }
  812.   match                return (MATCH);
  813.   in                return (IN);
  814.   bind                return (BIND);
  815.   define                return (DEFINE);
  816.   macro                return (MACRO);
  817. --- 74,85 ----
  818.   
  819.   [ \t\f]+            ;     /* discard whitepsace  */
  820.   [\n]                Lcount++;
  821. ! ^\#[ \t]*[0-9]+[ \t]*\".*\"[ \t]*[\n]    {
  822.                       sscanf (yytext, "%*c%d%s", &Lcount, FNbuf);
  823.                       }
  824.   match                return (MATCH);
  825.   in                return (IN);
  826. + map                return (MAP);
  827.   bind                return (BIND);
  828.   define                return (DEFINE);
  829.   macro                return (MACRO);
  830. ***************
  831. *** 64,69 ****
  832. --- 93,99 ----
  833.   host                return (HOST);
  834.   user                return (USER);
  835.   hostnum                return (HOSTNUM);
  836. + while        |
  837.   if                return (IF);
  838.   retry                return (RETRY);
  839.   next                return (NEXT);
  840. ***************
  841. *** 106,111 ****
  842. --- 136,142 ----
  843.   o_rsend                return (MOPT);
  844.   o_dnet                return (NNOPT);
  845.   o_hformat            return (OOPT);
  846. + o_qfactor            return (QOPT);
  847.   o_qdir                return (QQOPT);
  848.   o_tread                return (ROPT);
  849.   o_flog                return (SSOPT);
  850. ***************
  851. *** 117,122 ****
  852. --- 148,157 ----
  853.   o_wizpass            return (WWOPT);
  854.   o_loadq                return (XOPT);
  855.   o_loadnc            return (XXOPT);
  856. + o_recipfactor            return (YOPT);
  857. + o_newproc            return (YYOPT);
  858. + o_prifactor            return (ZOPT);
  859. + o_waitfactor            return (ZZOPT);
  860.   f_ffrom                return (FFLAG);
  861.   f_rfrom                return (RFLAG);
  862.   f_noreset            return (SSFLAG);
  863. ***************
  864. *** 139,144 ****
  865. --- 174,180 ----
  866.   f_retsmtp            return (PFLAG);
  867.   f_smtp                return (IIFLAG);
  868.   f_addrw                return (CCFLAG);
  869. + f_escape            return (EEFLAG);
  870.   [A-Za-z][A-Za-z0-9_-]*        {
  871.                   /* store identifiers in symbol table */
  872.                   yylval.phe = LookupSymbol (yytext);
  873. ***************
  874. *** 149,154 ****
  875. --- 185,191 ----
  876.                       ErrorReport ("End of line in string.\n");
  877.                       unput (INch);
  878.                   }
  879. +                 fixquotes ();
  880.                   yylval.psb = (char *) malloc (strlen (yytext) + 1);
  881.                   strcpy (yylval.psb, yytext + 1);
  882.                   return (SCONST);
  883. ***************
  884. *** 197,199 ****
  885. --- 234,261 ----
  886.                   }
  887.                   }
  888.   %%
  889. + /*
  890. +  * fixquotes --- inside a "quoted string", turn `\"' into just `"'
  891. +  *
  892. +  * this is most useful inside the Argv strings for mailers,
  893. +  * particularly when debugging.
  894. +  */
  895. + fixquotes ()
  896. + {
  897. +     register char *cp1, *cp2;
  898. +     cp1 = cp2 = yytext;
  899. +     while (*cp2) {
  900. +         /*
  901. +          * if we really wanted to get fancy,
  902. +          * at this point we'd handle C escapes,
  903. +          * but I don't think it's necessary.
  904. +          */
  905. +         if (*cp2 == '\\' && cp2[1] == '"')
  906. +             cp2++;
  907. +         *cp1++ = *cp2++;
  908. +     }
  909. +     *cp1++ = *cp2++;    /* final '\0' */
  910. + }
  911. diff -cr src/main.c /usr/src/local/local.bin/ease/src/main.c
  912. *** src/main.c    Thu Aug 13 12:07:57 1987
  913. --- /usr/src/local/local.bin/ease/src/main.c    Thu Aug 13 16:24:50 1987
  914. ***************
  915. *** 1,4 ****
  916. ! /*    $Header: /usr/src/local/etc/ease/RCS/main.c,v 1.2 85/10/29 23:43:38 jss Exp $    */
  917.   
  918.   /*
  919.    *      main.c     -- Main procedure for Ease Translator.
  920. --- 1,4 ----
  921. ! /*    $Header: main.c,v 1.3 87/08/13 16:24:47 root Locked $    */
  922.   
  923.   /*
  924.    *      main.c     -- Main procedure for Ease Translator.
  925. ***************
  926. *** 14,19 ****
  927. --- 14,20 ----
  928.    *
  929.    */
  930.   
  931. + #include "fixstrings.h"
  932.   #include <stdio.h>
  933.   
  934.   extern FILE *DIAGf;            /* diagnostic file */
  935. ***************
  936. *** 100,113 ****
  937.       }
  938.       printf ("###################################################\n");
  939.       printf ("##                                               ##\n");
  940. !     printf ("##  WARNING: THIS FILE IS TO BE MODIFIED BY      ##\n");
  941. !     printf ("##           THE EASE TRANSLATOR (ET) ONLY.      ##\n");
  942.       printf ("##                                               ##\n");
  943. !     printf ("##           ALL OTHER MODIFICATIONS WILL        ##\n");
  944. !     printf ("##           DISAPPEAR THE NEXT TIME ET IS RUN.  ##\n");
  945. !     printf ("##                                               ##\n");
  946. !     printf ("##           MAKE MODIFICATIONS TO THE EASE      ##\n");
  947. !     printf ("##           SOURCE ONLY.                        ##\n");
  948.       printf ("##                                               ##\n");
  949.       printf ("###################################################\n");
  950.   }
  951. --- 101,114 ----
  952.       }
  953.       printf ("###################################################\n");
  954.       printf ("##                                               ##\n");
  955. !     printf ("##  WARNING: THIS FILE IS THE OUTPUT OF THE      ##\n");
  956. !     printf ("##           `EASE' PRECOMPILER FOR SENDMAIL     ##\n");
  957. !     printf ("##           CONFIGURATION FILES.                ##\n");
  958.       printf ("##                                               ##\n");
  959. !     printf ("##           MAKE MODIFICATIONS TO THE SOURCE    ##\n");
  960. !     printf ("##           FILE ONLY.  CHANGES MADE DIRECTLY   ##\n");
  961. !     printf ("##           TO THIS FILE WILL DISAPPEAR THE     ##\n");
  962. !     printf ("##           NEXT TIME THAT EASE IS RUN.         ##\n");
  963.       printf ("##                                               ##\n");
  964.       printf ("###################################################\n");
  965.   }
  966. diff -cr src/parser.y /usr/src/local/local.bin/ease/src/parser.y
  967. *** src/parser.y    Thu Aug 13 12:08:20 1987
  968. --- /usr/src/local/local.bin/ease/src/parser.y    Mon Jan 25 15:41:46 1988
  969. ***************
  970. *** 1,5 ****
  971.   %{
  972. ! /*    $Header: /usr/src/local/etc/ease/RCS/parser.y,v 1.3 85/12/10 18:02:11 jss Exp $    */
  973.   
  974.   /*
  975.    *    parser.y -- EASE parser.
  976. --- 1,5 ----
  977.   %{
  978. ! /*    $Header: parser.y,v 1.10 88/01/25 15:41:27 root Locked $    */
  979.   
  980.   /*
  981.    *    parser.y -- EASE parser.
  982. ***************
  983. *** 17,24 ****
  984. --- 17,40 ----
  985.    *
  986.    *    All rights reserved.
  987.    *
  988. +  ***************************************************************************
  989. +  *
  990. +  * EUCC - Arnold Robbins - 8/13/87.
  991. +  * Added in support for new options and mailer flag in 4.3 sendmail.
  992. +  *
  993. +  * FLUKE jps 18-jun-86 - Changes made to support more flexibility in
  994. +  * defining header strings as concatenations of simple strings or `ifset'
  995. +  * strings. Also changes to support Sun sendmail accessing YP maps.
  996. +  *
  997. +  * EUCC - Arnold Robbins - 12/22/87.
  998. +  * Made some changes to restore some functionality in string concatenation,
  999. +  * and to remove reduce/reduce conflicts in JPS's original productions.
  1000. +  *
  1001. +  * EUCC - Arnold Robbins - 1/21/88
  1002. +  * Missed a 4.3 flag earlier.
  1003.    */
  1004.   
  1005. + #include "fixstrings.h"
  1006.   #include <stdio.h>
  1007.   #include "symtab.h"
  1008.   
  1009. ***************
  1010. *** 73,82 ****
  1011. --- 89,101 ----
  1012.   %token AAOPT AOPT BBOPT COPT DOPT DOPTI DOPTB DOPTQ DDOPT EOPT EOPTP EOPTE 
  1013.   %token EOPTM EOPTW EOPTZ FFOPT FOPT GOPT HHOPT IOPT LLOPT MOPT NNOPT OOPT QQOPT
  1014.   %token ROPT SSOPT SOPT TTOPT TOPT UOPT VOPT WWOPT XOPT XXOPT
  1015. + %token QOPT YOPT YYOPT ZOPT ZZOPT
  1016. + %token EEFLAG
  1017.   %token FFLAG RFLAG SSFLAG NFLAG LFLAG SFLAG MFLAG FFFLAG DDFLAG MMFLAG XFLAG
  1018.   %token PPFLAG UFLAG HFLAG AAFLAG UUFLAG EFLAG XXFLAG LLFLAG PFLAG IIFLAG CCFLAG
  1019.   %token ASGN COMMA LBRACE RBRACE LPAREN RPAREN SEMI DOLLAR MATCH IN HOSTNUM
  1020.   %token DEFINE FIELD COLON STAR HOST USER
  1021. + %token MAP
  1022.   
  1023.   %type    <psb>        mval strval ifcon conval ifres elseres nameset namelist
  1024.   %type    <psb>        doptid eoptid idlist fcond dlist mflags route mdefs
  1025. ***************
  1026. *** 83,88 ****
  1027. --- 102,108 ----
  1028.   %type    <psb>        matchaddr matchtok action actionstmt mailerspec mtdef
  1029.   %type    <psb>        rwaddr rwtok ftype reftok rword cantok resolution
  1030.   %type    <psb>        userspec hword hostid dheader
  1031. + %type    <psb>        catstring canval canvaltok
  1032.   %type    <ival>        anychar
  1033.   %type    <phe>        cdef
  1034.   %type    <optval>    optid
  1035. ***************
  1036. *** 297,302 ****
  1037. --- 317,325 ----
  1038.           |    QQOPT {
  1039.                   $$ = opt_Q;
  1040.               }
  1041. +         |    QOPT {
  1042. +                 $$ = opt_q;
  1043. +             }
  1044.           |    ROPT {
  1045.                   $$ = opt_r;
  1046.               }
  1047. ***************
  1048. *** 327,332 ****
  1049. --- 350,367 ----
  1050.           |    XXOPT {
  1051.                   $$ = opt_X;
  1052.               }
  1053. +         |    YOPT {
  1054. +                 $$ = opt_y;
  1055. +             }
  1056. +         |    YYOPT {
  1057. +                 $$ = opt_Y;
  1058. +             }
  1059. +         |    ZOPT {
  1060. +                 $$ = opt_z;
  1061. +             }
  1062. +         |    ZZOPT {
  1063. +                 $$ = opt_Z;
  1064. +             }
  1065.           ;
  1066.   
  1067.   doptid        :    DOPTI {
  1068. ***************
  1069. *** 477,482 ****
  1070. --- 512,520 ----
  1071.           |    CCFLAG {
  1072.                   $$ = flg_C;
  1073.               }
  1074. +         |    EEFLAG {
  1075. +                 $$ = flg_E;
  1076. +             }
  1077.           ;
  1078.   
  1079.   dheader        :    /* empty */ {
  1080. ***************
  1081. *** 497,503 ****
  1082.           |    error
  1083.           ;
  1084.   
  1085. ! dlist        :    LPAREN strval COMMA mval RPAREN {
  1086.                   $$ = ListAppend ($2, MacScan ($4), " ");
  1087.                   free ($2);
  1088.                   free ($4);
  1089. --- 535,541 ----
  1090.           |    error
  1091.           ;
  1092.   
  1093. ! dlist        :    LPAREN strval COMMA catstring RPAREN {
  1094.                   $$ = ListAppend ($2, MacScan ($4), " ");
  1095.                   free ($2);
  1096.                   free ($4);
  1097. ***************
  1098. *** 507,512 ****
  1099. --- 545,569 ----
  1100.               }
  1101.           ;
  1102.   
  1103. + catstring    :    SCONST {
  1104. +                 $$ = $1;
  1105. +             }
  1106. +         |    ifcon {
  1107. +                 $$ = $1;
  1108. +             }
  1109. +         |    CONCAT LPAREN conval RPAREN {
  1110. +                 $$ = $3;
  1111. +             }
  1112. +         |    catstring SCONST {
  1113. +                 $$ = ListAppend ($1, $2, (char *) NULL);
  1114. +                 free ($1);
  1115. +             }
  1116. +         |    catstring ifcon {
  1117. +                 $$ = ListAppend ($1, $2, (char *) NULL);
  1118. +                 free ($2);
  1119. +             }
  1120. +         ;
  1121.   mlist        :    /* empty */
  1122.           |    mlist IDENT LBRACE mdefs RBRACE SEMI {
  1123.                   EmitDef (def_mailer, $2, $4, (char *) NULL);
  1124. ***************
  1125. *** 672,687 ****
  1126.               }
  1127.           ;
  1128.   
  1129. ! cantok        :    CANON LPAREN IDENT RPAREN {
  1130. !                 $$ = Bracket ($3->psb, TRUE);
  1131. !                 RemoveSymbol ($3);
  1132. !             }
  1133. !         |    CANON LPAREN SCONST RPAREN {
  1134. !                 $$ = Bracket (MacScan ($3), TRUE);
  1135.                   free ($3);
  1136.               }
  1137. !         |    CANON LPAREN reftok RPAREN {
  1138. !                 $$ = Bracket ($3, TRUE);
  1139.                   free ($3);
  1140.               }
  1141.           ;
  1142. --- 729,766 ----
  1143.               }
  1144.           ;
  1145.   
  1146. ! cantok        :    CANON LPAREN canval RPAREN {
  1147. !                 $$ = Bracket ($3, TRUE);
  1148.                   free ($3);
  1149.               }
  1150. ! canval        :    canvaltok {
  1151. !                 $$ = $1;
  1152. !             }
  1153. !         |    canval canvaltok {
  1154. !                 $$ = ListAppend ($1, $2, (char *) NULL);
  1155. !                 free ($1);
  1156. !                 free ($2);
  1157. !             }
  1158. !         ;
  1159. ! canvaltok    :    IDENT {
  1160. !                 $$ = ListAppend ($1->psb, (char *) NULL, (char *) NULL);
  1161. !                 RemoveSymbol ($1);
  1162. !             }
  1163. !         |    SCONST {
  1164. !                 $$ = ListAppend (MacScan ($1), (char *) NULL, (char *) NULL);
  1165. !                 free ($1);
  1166. !             }
  1167. !         |    reftok {
  1168. !                 $$ = $1;
  1169. !             }
  1170. !         |    SEPCHAR {
  1171. !                 *Cbuf = $1;
  1172. !                 $$ = ListAppend (Cbuf, (char *) NULL, (char *) NULL);
  1173. !             }
  1174. !         |    HOSTNUM LPAREN reftok RPAREN {
  1175. !                 $$ = Bracket ($3, FALSE);
  1176.                   free ($3);
  1177.               }
  1178.           ;
  1179. ***************
  1180. *** 804,814 ****
  1181.           ;
  1182.   
  1183.   ftype        :    MATCH LPAREN ICONST RPAREN cdef {
  1184. !                 $$ = ListAppend (MakeField ($3, $5, FALSE), 
  1185.                                (char *) NULL, (char *) NULL);
  1186.               }
  1187.           |    MATCH LPAREN ICONST STAR RPAREN {
  1188. !                 $$ = ListAppend (MakeField ($3, (struct he *) NULL, TRUE), 
  1189.                            (char *) NULL, (char *) NULL);
  1190.               }
  1191.           |    error {
  1192. --- 883,901 ----
  1193.           ;
  1194.   
  1195.   ftype        :    MATCH LPAREN ICONST RPAREN cdef {
  1196. !                 $$ = ListAppend (MakeField ($3, $5, FALSE, FALSE), 
  1197.                                (char *) NULL, (char *) NULL);
  1198.               }
  1199. +         |    MATCH LPAREN ICONST RPAREN MAP IDENT {
  1200. +                 $$ = ListAppend (MakeField ($3, $6, FALSE, TRUE), 
  1201. +                              (char *) NULL, (char *) NULL);
  1202. +             }
  1203. +         |    MATCH HOST {
  1204. +                 $$ = ListAppend ("$%y", 
  1205. +                              (char *) NULL, (char *) NULL);
  1206. +             }
  1207.           |    MATCH LPAREN ICONST STAR RPAREN {
  1208. !                 $$ = ListAppend (MakeField ($3, (struct he *) NULL, TRUE, FALSE), 
  1209.                            (char *) NULL, (char *) NULL);
  1210.               }
  1211.           |    error {
  1212. diff -cr src/strops.c /usr/src/local/local.bin/ease/src/strops.c
  1213. *** src/strops.c    Thu Aug 13 12:08:23 1987
  1214. --- /usr/src/local/local.bin/ease/src/strops.c    Mon Jan 25 15:41:53 1988
  1215. ***************
  1216. *** 1,4 ****
  1217. ! /*    $Header: /usr/src/local/etc/ease/RCS/strops.c,v 1.2 85/10/29 23:45:39 jss Exp $    */
  1218.   
  1219.   /*
  1220.    *    strops.c   -- Contains string operation routines used for constructing
  1221. --- 1,4 ----
  1222. ! /*    $Header: strops.c,v 1.5 88/01/25 15:41:47 root Locked $    */
  1223.   
  1224.   /*
  1225.    *    strops.c   -- Contains string operation routines used for constructing
  1226. ***************
  1227. *** 15,20 ****
  1228. --- 15,21 ----
  1229.    *
  1230.    */
  1231.   
  1232. + #include "fixstrings.h"
  1233.   #include <stdio.h>
  1234.   #include <strings.h>
  1235.   #include "symtab.h"
  1236. ***************
  1237. *** 34,39 ****
  1238. --- 35,54 ----
  1239.   static char   *Ofield = "$-";        /* one token match structure      */
  1240.   static char   *Zfield = "$*";        /* zero or more tokens structure  */
  1241.   static char   *Pfield = "$+";        /* one or more tokens structure      */
  1242. + /*
  1243. +  *  FLUKE jps 25-apr-86
  1244. +  *
  1245. +  *  Add the three new $%x, $%y, and $!x match operators that Sun introduced
  1246. +  *  with release 3.0.
  1247. +  *
  1248. +  *  BUG (probably) - Sun has assigned a predefined meaning to the $y macro;
  1249. +  *  I imagine we will need to teach ease to avoid this letter.
  1250. +  */
  1251. + static char   *Hfield = "$%y";        /*    match in /etc/hosts */
  1252. + static char   *Mfield = "$% ";        /*    match in specified YP map */
  1253. + static char   *Nfield = "$! ";        /* no match in specified YP map */
  1254.   static char   *Mtest  = "$? ";        /* conditional macro test string  */
  1255.   
  1256.   
  1257. ***************
  1258. *** 69,74 ****
  1259. --- 84,90 ----
  1260.           case opt_o  :    return ("o");
  1261.           case e_opt_p:    return ("p");
  1262.           case opt_Q  :    return ("Q");
  1263. +         case opt_q  :    return ("q");
  1264.           case d_opt_q:    return ("q");
  1265.           case opt_r  :    return ("r");
  1266.           case opt_S  :    return ("S");
  1267. ***************
  1268. *** 81,86 ****
  1269. --- 97,106 ----
  1270.           case e_opt_w:    return ("w");
  1271.           case opt_x  :    return ("x");
  1272.           case opt_X  :    return ("X");
  1273. +         case opt_y  :    return ("y");
  1274. +         case opt_Y  :    return ("Y");
  1275. +         case opt_z  :    return ("z");
  1276. +         case opt_Z  :    return ("Z");
  1277.           case e_opt_z:    return ("z");
  1278.           default     :    FatalError ("Bad case in ConvOpt ()", (char *) NULL);
  1279.       }
  1280. ***************
  1281. *** 120,125 ****
  1282. --- 140,146 ----
  1283.           case flg_p:    return ("p");
  1284.           case flg_I:    return ("I");
  1285.           case flg_C:    return ("C");
  1286. +         case flg_E:    return ("E");
  1287.           default   :    FatalError ("Bad case in ConvFlg ()", (char *) NULL);
  1288.       }
  1289.       /*NOTREACHED*/
  1290. ***************
  1291. *** 336,346 ****
  1292.           PrintError ("Undefined ruleset identifier:", cid->psb);
  1293.           return ((char *) NULL);
  1294.       }
  1295. !     res = (char *) malloc (strlen (cid->idval.rsn) + strlen (rwaddr) + 3);
  1296.       if (res == NULL)
  1297.           FatalError ("System out of string space in MakeRSCall ()", (char *) NULL);
  1298.       res = strcpy (res, "$>");    /* construct the call string */
  1299.       res = strcat (res, cid->idval.rsn);
  1300.       res = strcat (res, rwaddr);
  1301.       return (res);
  1302.   }
  1303. --- 357,376 ----
  1304.           PrintError ("Undefined ruleset identifier:", cid->psb);
  1305.           return ((char *) NULL);
  1306.       }
  1307. !     /*
  1308. !      * FLUKE jps - 8-may-86 - boost string size by 1 to accomodate space
  1309. !      * character.
  1310. !      */
  1311. !     res = (char *) malloc (strlen (cid->idval.rsn) + strlen (rwaddr) + 4);
  1312.       if (res == NULL)
  1313.           FatalError ("System out of string space in MakeRSCall ()", (char *) NULL);
  1314.       res = strcpy (res, "$>");    /* construct the call string */
  1315.       res = strcat (res, cid->idval.rsn);
  1316. +     res = strcat (res, " ");  /* FLUKE jps - work around sendmail bug:
  1317. +                    * whitespace is needed to separate tokens:
  1318. +                    * for example:  $>30$D will confuse
  1319. +                    * sendmail, but $>30 $D is OK.
  1320. +                    */
  1321.       res = strcat (res, rwaddr);
  1322.       return (res);
  1323.   }
  1324. ***************
  1325. *** 353,364 ****
  1326.    *            are used to determine what type of field string to
  1327.    *            construct.
  1328.    *
  1329.    */
  1330.   char *
  1331. ! MakeField (count, class, fstar)
  1332.   register int count;        /* match count (0 or 1) */
  1333.   register struct he *class;    /* optional class type  */
  1334.   register short fstar;        /* repetition flag    */
  1335.   {
  1336.       switch (count) {
  1337.           case 0:      if (class == NULL)    /* any token is valid */
  1338. --- 383,398 ----
  1339.    *            are used to determine what type of field string to
  1340.    *            construct.
  1341.    *
  1342. +  *  FLUKE jps 25-apr-86 - Modified to add a fourth parameter "isYPmap".  This
  1343. +  *  supports Sun's new Yellow Pages match patterns added in release 3.0.
  1344. +  *
  1345.    */
  1346.   char *
  1347. !     MakeField (count, class, fstar, isYPmap)
  1348.   register int count;        /* match count (0 or 1) */
  1349.   register struct he *class;    /* optional class type  */
  1350.   register short fstar;        /* repetition flag    */
  1351. + register short isYPmap;        /* "class" name is really a YP map name */
  1352.   {
  1353.       switch (count) {
  1354.           case 0:      if (class == NULL)    /* any token is valid */
  1355. ***************
  1356. *** 368,387 ****
  1357.                       ErrorReport ("Invalid field type.\n");
  1358.                       return ((char *) NULL);
  1359.                   }
  1360. !               else {        /* match 0 from class */
  1361.                   Cfield[1] = '~';
  1362.                   Cfield[2] = MakeMac (class, ID_CLASS);
  1363.                   return (Cfield);
  1364.                 }
  1365.           case 1:      if (class == NULL)    /* any token is valid */
  1366.                   if (fstar)
  1367.                       return (Pfield);
  1368.                   else
  1369.                       return (Ofield);
  1370. !               else {        /* match 1 from class */
  1371.                   Cfield[1] = '=';
  1372.                   Cfield[2] = MakeMac (class, ID_CLASS);
  1373.                   return (Cfield);
  1374.                 }
  1375.           default:  ErrorReport ("Invalid field type.\n");
  1376.       }
  1377. --- 402,439 ----
  1378.                       ErrorReport ("Invalid field type.\n");
  1379.                       return ((char *) NULL);
  1380.                   }
  1381. !               else {        /* match 0 from class or map */
  1382. !                 if (isYPmap) {
  1383. !                     /*  "class" is a misnomer here; it's really
  1384. !                      *  a simple macro name for a YP map.
  1385. !                      *  FLUKE jps 25-apr-86
  1386. !                      */
  1387. !                     Nfield[2] = MakeMac (class, ID_MACRO);
  1388. !                     return (Nfield);
  1389. !                 } else {
  1390.                   Cfield[1] = '~';
  1391.                   Cfield[2] = MakeMac (class, ID_CLASS);
  1392.                   return (Cfield);
  1393.                 }
  1394. +               }
  1395.           case 1:      if (class == NULL)    /* any token is valid */
  1396.                   if (fstar)
  1397.                       return (Pfield);
  1398.                   else
  1399.                       return (Ofield);
  1400. !               else {        /* match 1 from class or map */
  1401. !                 if (isYPmap) {
  1402. !                     /*  "class" is a misnomer here; it's really
  1403. !                      *  a simple macro name for a YP map.
  1404. !                      *  FLUKE jps 25-apr-86
  1405. !                      */
  1406. !                     Mfield[2] = MakeMac (class, ID_MACRO);
  1407. !                     return (Mfield);
  1408. !                 } else {
  1409.                   Cfield[1] = '=';
  1410.                   Cfield[2] = MakeMac (class, ID_CLASS);
  1411.                   return (Cfield);
  1412. +                 }
  1413.                 }
  1414.           default:  ErrorReport ("Invalid field type.\n");
  1415.       }
  1416. diff -cr src/symtab.c /usr/src/local/local.bin/ease/src/symtab.c
  1417. *** src/symtab.c    Thu Aug 13 12:08:01 1987
  1418. --- /usr/src/local/local.bin/ease/src/symtab.c    Thu Aug 13 16:25:19 1987
  1419. ***************
  1420. *** 1,4 ****
  1421. ! /*    $Header: /usr/src/local/etc/ease/RCS/symtab.c,v 1.2 85/10/29 23:46:48 jss Exp $    */
  1422.   
  1423.   /*
  1424.    *      symtab.c   -- Contains Ease Translator symbol table routines.
  1425. --- 1,4 ----
  1426. ! /*    $Header: symtab.c,v 1.3 87/08/13 16:25:09 root Locked $    */
  1427.   
  1428.   /*
  1429.    *      symtab.c   -- Contains Ease Translator symbol table routines.
  1430. ***************
  1431. *** 14,19 ****
  1432. --- 14,20 ----
  1433.    *
  1434.    */
  1435.   
  1436. + #include "fixstrings.h"
  1437.   #include <stdio.h>
  1438.   #include <ctype.h>
  1439.   #include "symtab.h"
  1440. ***************
  1441. *** 59,64 ****
  1442. --- 60,70 ----
  1443.               {"sentinel",    '\0'}
  1444.   };
  1445.   
  1446. + /* FLUKE jps 28-apr-86 - Install some wired-in class names */
  1447. + static struct Defmac ClassDefs[] = {    /* predefined classes */
  1448. +             {"c_myname",    'w'},
  1449. +             {"class_sentinel",    '\0'}
  1450. + };
  1451.   
  1452.   /*
  1453.    *    DefScan () -- Scan symbol table to find macros, classes, mailers, 
  1454. ***************
  1455. *** 81,87 ****
  1456. --- 87,101 ----
  1457.                        isupper(hcsearch->idval.idc)) &&
  1458.                        !ISMACRO(hcsearch->idd))
  1459.                       PrintWarning ("Macro not defined: %s\n", hcsearch->psb);
  1460. + #ifdef notdef
  1461.                   if (ISCLASS(hcsearch->idtype) && !ISCLASS(hcsearch->idd))
  1462. + #else
  1463. +                 /* FLUKE jps 28-apr-86 */
  1464. +                 /* print warnings for UPPER CASE names only */
  1465. +                 if (ISCLASS(hcsearch->idtype) &&
  1466. +                     isupper(hcsearch->idval.idc) &&
  1467. +                     !ISCLASS(hcsearch->idd))
  1468. + #endif
  1469.                       PrintWarning ("Class not defined: %s\n", hcsearch->psb);
  1470.                   if (ISMAILER(hcsearch->idtype) && !ISMAILER(hcsearch->idd))
  1471.                       PrintWarning ("Mailer not defined: %s\n", hcsearch->psb);
  1472. ***************
  1473. *** 122,127 ****
  1474. --- 136,148 ----
  1475.       for (macptr = &MacDefs[0]; (*macptr).macrep != '\0'; macptr++) {
  1476.           symptr = LookupSymbol ((*macptr).macname);
  1477.           symptr->idtype |= ID_MACRO;
  1478. +         symptr->idval.idc = (*macptr).macrep;
  1479. +     }
  1480. +     /* preload special (lower-case) classes */
  1481. +     for (macptr = &ClassDefs[0]; (*macptr).macrep != '\0'; macptr++) {
  1482. +         symptr = LookupSymbol ((*macptr).macname);
  1483. +         symptr->idtype |= ID_CLASS;
  1484.           symptr->idval.idc = (*macptr).macrep;
  1485.       }
  1486.   
  1487. diff -cr src/symtab.h /usr/src/local/local.bin/ease/src/symtab.h
  1488. *** src/symtab.h    Thu Aug 13 12:07:25 1987
  1489. --- /usr/src/local/local.bin/ease/src/symtab.h    Mon Jan 25 15:41:58 1988
  1490. ***************
  1491. *** 1,4 ****
  1492. ! /*    $Header: /usr/src/local/etc/ease/RCS/symtab.h,v 1.2 85/10/29 23:47:47 jss Exp $    */
  1493.   
  1494.   /*
  1495.    *    symtab.h    -- Definitions related to the "et" symbol table. 
  1496. --- 1,4 ----
  1497. ! /*    $Header: symtab.h,v 1.4 88/01/25 15:41:54 root Locked $    */
  1498.   
  1499.   /*
  1500.    *    symtab.h    -- Definitions related to the "et" symbol table. 
  1501. ***************
  1502. *** 45,52 ****
  1503.   
  1504.   /* option types */
  1505.   enum opts {opt_A, opt_a, opt_B, opt_c, opt_D, opt_d, opt_e, opt_F, opt_f, 
  1506. !        opt_g, opt_H, opt_i, opt_L, opt_m, opt_N, opt_o, opt_Q, opt_r, 
  1507. !        opt_S, opt_s, opt_T, opt_t, opt_u, opt_v, opt_W, opt_x, opt_X, 
  1508.          d_opt_i, d_opt_b, d_opt_q,
  1509.          e_opt_p, e_opt_e, e_opt_m, e_opt_w, e_opt_z};
  1510.   
  1511. --- 45,53 ----
  1512.   
  1513.   /* option types */
  1514.   enum opts {opt_A, opt_a, opt_B, opt_c, opt_D, opt_d, opt_e, opt_F, opt_f, 
  1515. !        opt_g, opt_H, opt_i, opt_L, opt_m, opt_N, opt_o, opt_Q, opt_q,
  1516. !        opt_r, opt_S, opt_s, opt_T, opt_t, opt_u, opt_v, opt_W, opt_x,
  1517. !        opt_X, opt_Y, opt_y, opt_Z, opt_z,
  1518.          d_opt_i, d_opt_b, d_opt_q,
  1519.          e_opt_p, e_opt_e, e_opt_m, e_opt_w, e_opt_z};
  1520.   
  1521. ***************
  1522. *** 53,59 ****
  1523.   /* flag types */
  1524.   enum flgs {flg_f, flg_r, flg_S, flg_n, flg_l, flg_s, flg_m, flg_F, flg_D,
  1525.          flg_M, flg_x, flg_P, flg_u, flg_h, flg_A, flg_U, flg_e, flg_X,
  1526. !        flg_L, flg_p, flg_I, flg_C};
  1527.   
  1528.   /* mailer parameters */
  1529.   enum mats {mat_path, mat_flags, mat_sender, mat_recipient, mat_argv, 
  1530. --- 54,60 ----
  1531.   /* flag types */
  1532.   enum flgs {flg_f, flg_r, flg_S, flg_n, flg_l, flg_s, flg_m, flg_F, flg_D,
  1533.          flg_M, flg_x, flg_P, flg_u, flg_h, flg_A, flg_U, flg_e, flg_X,
  1534. !        flg_L, flg_p, flg_I, flg_C, flg_E};
  1535.   
  1536.   /* mailer parameters */
  1537.   enum mats {mat_path, mat_flags, mat_sender, mat_recipient, mat_argv, 
  1538. diff -c /dev/null fixstrings.h
  1539. *** /dev/null    Mon Jan 25 16:04:47 1988
  1540. --- fixstrings.h    Thu Aug 13 15:46:27 1987
  1541. ***************
  1542. *** 0 ****
  1543. --- 1,31 ----
  1544. + /*
  1545. +  * $Source: /vax4/usr3/src/local/tc/ease/RCS/fixstrings.h,v $
  1546. +  * $Locker:  $
  1547. +  *
  1548. +  * $Revision: 1.3 $
  1549. +  * Check-in $Date: 87/03/05 19:37:50 $
  1550. +  * $State: Exp $
  1551. +  *
  1552. +  * $Author: jeff $
  1553. +  *
  1554. +  * $Log:    /vax4/usr3/src/local/tc/ease/RCS/fixstrings.h,v $
  1555. +  * Version 1.3  87/03/05  19:37:50  jeff
  1556. +  * Edited RCS header and FLUKEid[] string.
  1557. +  * 
  1558. +  * Version 1.2  87/02/25  16:55:16  jeff
  1559. +  * Add some RCS header lines.  No code changes.
  1560. +  * 
  1561. +  */
  1562. + /* FLUKE jps 16-apr-86 - revector the string routines to custom-coded ones
  1563. +  *  which handle NULL pointers.
  1564. +  */
  1565. + #define strcat    Xstrcat
  1566. + #define strncat    Xstrncat
  1567. + #define strcmp    Xstrcmp
  1568. + #define strncmp    Xstrncmp
  1569. + #define strcpy    Xstrcpy
  1570. + #define strncpy    Xstrncpy
  1571. + #define strlen    Xstrlen
  1572. + #define index    Xindex
  1573. + #define rindex    Xrindex
  1574. diff -c /dev/null fixstrings.c
  1575. *** /dev/null    Mon Jan 25 16:04:47 1988
  1576. --- fixstrings.c    Thu Aug 13 16:13:13 1987
  1577. ***************
  1578. *** 0 ****
  1579. --- 1,85 ----
  1580. + /*
  1581. +  * $Source: /vax4/usr3/src/local/tc/ease/RCS/fixstrings.c,v $
  1582. +  * $Locker:  $
  1583. +  *
  1584. +  * $Revision: 1.3 $
  1585. +  * Check-in $Date: 87/03/05 19:38:33 $
  1586. +  * $State: Exp $
  1587. +  *
  1588. +  * $Author: jeff $
  1589. +  *
  1590. +  * $Log:    /vax4/usr3/src/local/tc/ease/RCS/fixstrings.c,v $
  1591. +  * Version 1.3  87/03/05  19:38:33  jeff
  1592. +  * Edited RCS header and FLUKEid[] string.
  1593. +  * 
  1594. +  * Version 1.2  87/02/25  16:55:13  jeff
  1595. +  * Add some RCS header lines.  No code changes.
  1596. +  * 
  1597. +  */
  1598. + /*  FLUKE jps 16-apr-86 - special hacks for NULL pointers.
  1599. +  *
  1600. +  *  The author of ease used a *lot* of NULL pointers.  This isn't much
  1601. +  *  of a problem on a vax, where NULL pointers look like "".  Not so on a Sun.
  1602. +  *
  1603. +  *  We hack around the problem by defining a set of wrappers for the
  1604. +  *  standard string functions, making it appear as though they accept NULL
  1605. +  *  pointers.  In the other C files, cpp macros are used to revector the
  1606. +  *  standard string functions to this file.
  1607. +  */
  1608. + #include <strings.h>
  1609. + #define fix(s) ((s) ? (s) : "")
  1610. + char *Xstrcat (s1, s2)
  1611. + char *s1, *s2; 
  1612. + {
  1613. +     return (strcat (s1, fix (s2)));
  1614. + }
  1615. + char *Xstrncat (s1, s2, n)
  1616. + char *s1, *s2; 
  1617. + {
  1618. +     return (strncat (s1, fix (s2), n));
  1619. + }
  1620. + Xstrcmp (s1, s2)
  1621. + char *s1, *s2; 
  1622. + {
  1623. +     return (strcmp (fix (s1), fix (s2)));
  1624. + }
  1625. + Xstrncmp (s1, s2, n)
  1626. + char *s1, *s2; 
  1627. + {
  1628. +     return (strncmp (fix (s1), fix (s2), n));
  1629. + }
  1630. + char *Xstrcpy (s1, s2)
  1631. + char *s1, *s2; 
  1632. + {
  1633. +     return (strcpy (s1, fix (s2)));
  1634. + }
  1635. + char *Xstrncpy (s1, s2, n)
  1636. + char *s1, *s2; 
  1637. + {
  1638. +     return (strncpy (s1, fix (s2), n));
  1639. + }
  1640. + Xstrlen (s)
  1641. + char *s; 
  1642. + {
  1643. +     return (strlen (fix (s)));
  1644. + }
  1645. + char *Xindex (s, c)
  1646. + char *s, c; 
  1647. + {
  1648. +     return (index (fix (s), c));
  1649. + }
  1650. + char *Xrindex (s, c)
  1651. + char *s, c; 
  1652. + {
  1653. +     return (rindex (fix (s), c));
  1654. + }
  1655. Howard_The_Duck
  1656. fi # end of overwriting check
  1657. echo shar: extracting "'local.shar'" '(3624 characters)'
  1658. if test -f 'local.shar'
  1659. then
  1660.     echo shar: will not over-write existing file "'local.shar'"
  1661. else
  1662. cat << \Howard_The_Duck > 'local.shar'
  1663. #! /bin/sh
  1664. # This is a shell archive, meaning:
  1665. # 1. Remove everything above the #! /bin/sh line.
  1666. # 2. Save the resulting text in a file.
  1667. # 3. Execute the file with /bin/sh (not csh) to create the files:
  1668. #    Makefile
  1669. #    ease.1
  1670. #    ease.ksh
  1671. #    ease.sh
  1672. # This archive created: Wed Dec 23 11:59:29 1987
  1673. export PATH; PATH=/bin:$PATH
  1674. echo shar: extracting "'Makefile'" '(260 characters)'
  1675. if test -f 'Makefile'
  1676. then
  1677.     echo shar: will not over-write existing file "'Makefile'"
  1678. else
  1679. cat << \SHAR_EOF > 'Makefile'
  1680. # Makefile for 'ease'
  1681. #
  1682.  
  1683. EASE_SH= ease.ksh
  1684. #EASE_SH= ease.sh
  1685.  
  1686. install: ../src/et $(EASE_SH)
  1687.     install -c -s ../src/et /usr/local/lib
  1688.     cp $(EASE_SH) /usr/local/bin/ease
  1689.     chmod 755 /usr/local/bin/ease
  1690.     cp ease.1 /usr/man/manl/ease.l
  1691.  
  1692. ../src/et:
  1693.     cd ../src ; make
  1694. SHAR_EOF
  1695. fi # end of overwriting check
  1696. echo shar: extracting "'ease.1'" '(788 characters)'
  1697. if test -f 'ease.1'
  1698. then
  1699.     echo shar: will not over-write existing file "'ease.1'"
  1700. else
  1701. cat << \SHAR_EOF > 'ease.1'
  1702. .TH EASE 1 local
  1703. .SH NAME
  1704. ease \- build sendmail configuration files from readable descriptions
  1705. .SH SYNOPSIS
  1706. .B ease
  1707. [
  1708. .I cpp
  1709. options ]
  1710. [ input_file ...  ] [
  1711. .B \-o
  1712. output_file ]
  1713. .SH DESCRIPTION
  1714. .I Ease
  1715. is a simple shell script that
  1716. runs the C preprocessor, piping the output into the Ease Translator.
  1717. .PP
  1718. If the
  1719. .B \-o
  1720. option is given, the named file will be used for the generated
  1721. configuration information, otherwise the standard output is used.
  1722. .PP
  1723. By default,
  1724. .I ease
  1725. will read and write the standard input and output.
  1726. .SH FILES
  1727. /lib/cpp
  1728. .br
  1729. /usr/local/lib/et
  1730. .SH SEE ALSO
  1731. .I "Ease: A Configuration Language for Sendmail"
  1732. by James S. Schoner,
  1733. published in the January/February 1986 Usenix
  1734. .IR ;login: .
  1735. .SH DIAGNOSTICS
  1736. A simple usage message if inappropriate arguments are supplied.
  1737. SHAR_EOF
  1738. fi # end of overwriting check
  1739. echo shar: extracting "'ease.ksh'" '(694 characters)'
  1740. if test -f 'ease.ksh'
  1741. then
  1742.     echo shar: will not over-write existing file "'ease.ksh'"
  1743. else
  1744. cat << \SHAR_EOF > 'ease.ksh'
  1745. #! /bin/ksh
  1746.  
  1747. # ease -- run /lib/cpp and send the output into the ease translator
  1748. #
  1749. # usage: ease [ cpp options ] [ input files ] [ -o output_file ]
  1750.  
  1751. PATH=/bin:/usr/ucb:/usr/bin
  1752. export PATH
  1753.  
  1754. function usage
  1755. {
  1756.     echo usage: ease [ cpp options ] [ input files ] [ -o output_file ] 1>&2
  1757.     exit 1
  1758. }
  1759.  
  1760. ifiles=
  1761. ofile=
  1762. opts=
  1763.  
  1764. while [ $# -gt 0 ]
  1765. do
  1766.     case "$1" in
  1767.     -o)    if [ "$2" ]
  1768.         then
  1769.             ofile="$2"
  1770.             shift
  1771.         else
  1772.             usage
  1773.         fi
  1774.         ;;
  1775.     -o?*)    ofile="${1#-o}" ;;
  1776.     -?*)    opts="$opts $1" ;;    # probably -D or -I cpp options
  1777.     *)    ifiles="$ifiles $1" ;;    # will catch plain "-"
  1778.     esac
  1779.     shift
  1780. done
  1781.  
  1782. # use cat, since it understands the "-" convention
  1783.  
  1784. cat $ifiles | /lib/cpp $opts | cat -s | /usr/local/lib/et - $ofile
  1785. SHAR_EOF
  1786. fi # end of overwriting check
  1787. echo shar: extracting "'ease.sh'" '(686 characters)'
  1788. if test -f 'ease.sh'
  1789. then
  1790.     echo shar: will not over-write existing file "'ease.sh'"
  1791. else
  1792. cat << \SHAR_EOF > 'ease.sh'
  1793. #! /bin/sh
  1794.  
  1795. # ease -- run /lib/cpp and send the output into the ease translator
  1796. #
  1797. # usage: ease [ cpp options ] [ input files ] [ -o output_file ]
  1798.  
  1799. PATH=/bin:/usr/ucb:/usr/bin
  1800. export PATH
  1801.  
  1802. ifiles=
  1803. ofile=
  1804. opts=
  1805.  
  1806. while [ $# -gt 0 ]
  1807. do
  1808.     case "$1" in
  1809.     -o)    if [ "$2" ]
  1810.         then
  1811.             ofile="$2"
  1812.             shift
  1813.         else
  1814.             echo "usage: ease [ cpp options ] [ input files ] [ -o output_file ]" 1>&2
  1815.             exit 1
  1816.         fi
  1817.         ;;
  1818.     -o?*)    ofile="`expr $1 : '-o\(..*\)'`" ;;
  1819.     -?*)    opts="$opts $1" ;;    # probably -D or -I cpp options
  1820.     *)    ifiles="$ifiles $1" ;;    # will catch plain "-"
  1821.     esac
  1822.     shift
  1823. done
  1824.  
  1825. # use cat, since it understands the "-" convention
  1826.  
  1827. cat $ifiles | /lib/cpp $opts | cat -s | /usr/local/lib/et - $ofile
  1828. SHAR_EOF
  1829. fi # end of overwriting check
  1830. #    End of shell archive
  1831. exit 0
  1832. Howard_The_Duck
  1833. fi # end of overwriting check
  1834. #    End of shell archive
  1835. exit 0
  1836.  
  1837.  
  1838.